Fix some more flaky tests
authorAlex Crichton <alex@alexcrichton.com>
Wed, 5 Nov 2014 23:06:06 +0000 (15:06 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 5 Nov 2014 23:12:09 +0000 (15:12 -0800)
At the same time, also improve the deprecation message for the old build command
to be a little more descriptive about how to migrate

src/cargo/util/toml.rs
tests/test_cargo_compile_custom_build.rs
tests/test_cargo_compile_old_custom_build.rs

index f2abb2dd1f45a5b5d53e949c702c70b3a9535a5c..ead2c4f597a763a0026a06ce3dfca1eb1c1c99fc 100644 (file)
@@ -531,7 +531,12 @@ impl TomlManifest {
                                           deprecated in favor of [lib]"));
         }
         if has_old_build {
-            manifest.add_warning(format!("warning: the old build command has been deprecated"));
+            manifest.add_warning(format!("warning: an arbitrary build command \
+                                          has now been deprecated."));
+            manifest.add_warning(format!("         It has been replaced by custom \
+                                                   build scripts."));
+            manifest.add_warning(format!("         For more information, see \
+                                          http://doc.crates.io/build-script.html"));
         }
         Ok((manifest, nested_paths))
     }
index 4fa32fa635b5c359ed4d6000f681a53c4a7ee257..52211edd3a1d662674befecfc35e262bc82718f2 100644 (file)
@@ -455,7 +455,7 @@ test!(testing_and_such {
 {compiling} foo v0.5.0 (file://[..])
 {running} `[..]build-script-build[..]`
 {running} `rustc [..] --crate-name foo [..]`
-{running} `rustc [..] --test [..]`
+{running} `rustc [..] --crate-name foo [..]`
 {running} `[..]foo-[..]`
 
 running 0 tests
index 63a8081f2ef803672e93dad199c58c474b9f7a02..2e348db69e44b9838f1d73c72eb7895f7a116a28 100644 (file)
@@ -44,7 +44,9 @@ test!(old_custom_build {
                 execs().with_status(0)
                        .with_stdout(format!("   Compiling foo v0.5.0 ({})\n",
                                             p.url()))
-                       .with_stderr("warning: the old build command has been deprecated"));
+                       .with_stderr("warning: [..] deprecated.\n\
+                                              [..]\n\
+                                              [..]"));
 })
 
 test!(old_custom_multiple_build {
@@ -107,8 +109,7 @@ test!(old_custom_multiple_build {
     assert_that(p.cargo_process("build"),
                 execs().with_status(0)
                        .with_stdout(format!("   Compiling foo v0.5.0 ({})\n",
-                                            p.url()))
-                       .with_stderr("warning: the old build command has been deprecated"));
+                                            p.url())));
 })
 
 test!(old_custom_build_failure {
@@ -148,7 +149,9 @@ test!(old_custom_build_failure {
         "#);
     assert_that(p.cargo_process("build"),
                 execs().with_status(101).with_stderr(format!("\
-warning: the old build command has been deprecated\n\
+warning: an arbitrary build command has now been deprecated.
+         [..]
+         [..]
 Failed to run custom build command for `foo v0.5.0 ({dir})`
 Process didn't exit successfully: `{}` (status=101)\n\
 --- stderr\n\
@@ -212,7 +215,9 @@ test!(old_custom_second_build_failure {
         "#);
     assert_that(p.cargo_process("build"),
                 execs().with_status(101).with_stderr(format!("\
-warning: the old build command has been deprecated\n\
+warning: an arbitrary build command has now been deprecated.
+         [..]
+         [..]
 Failed to run custom build command for `foo v0.5.0 ({dir})`
 Process didn't exit successfully: `{}` (status=101)\n\
 --- stderr\n\